import { requestClient } from '#/api/request';

export namespace AccontApi {
  export interface PageFetchParams {
    query: any;
    page: number;
    pageSize: number;
  }
}

/**
 * 获取账单表格数据
 */
async function getAccontTableApi(params: AccontApi.PageFetchParams) {
  return requestClient.get(
    `/busi/bill/BillList/list/${params.pageSize}/${params.page}`,
    { params: params.query },
  );
}

/**
 * 新增账单数据
 */
async function addAccontTableApi(data: object) {
  return requestClient.post(`/bill/BillList/add`, data);
}

export { addAccontTableApi, getAccontTableApi };
